package com.cimpm.permission.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.hby.common.annotation.entity.Primary;
import com.hby.common.annotation.entity.Secondary;
import com.hby.common.annotation.entity.VerifyMultiRepetitionField;

import java.util.Date;

@TableName("permission_user_data_permission_mapper")
public class UserDataPermissionMapper {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Primary
    @VerifyMultiRepetitionField
    private Integer userId;

    @Secondary
    @VerifyMultiRepetitionField
    private Integer dataPermissionId;

    @TableLogic
    private Date isDeleted;

    @Version
    private Integer version;

    @Override
    public String toString() {
        return "UserDataPermissionMapper{" +
                "id=" + id +
                ", userId=" + userId +
                ", dataPermissionId=" + dataPermissionId +
                ", isDeleted=" + isDeleted +
                ", version=" + version +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getDataPermissionId() {
        return dataPermissionId;
    }

    public void setDataPermissionId(Integer dataPermissionId) {
        this.dataPermissionId = dataPermissionId;
    }

    public Date getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Date isDeleted) {
        this.isDeleted = isDeleted;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }
}
